using Framework;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace PokerGame
{
    public class PlayPanel : UIBase
    {
        private Button btnStart;
        private Button btnRegist;

        #region runtime
        private void Awake()
        {
            btnStart = transform.Find("btnStart").GetComponent<Button>();
            btnRegist = transform.Find("btnRegist").GetComponent<Button>();
        }
        private void Start()
        {
            btnStart.onClick.AddListener(BtnStart_OnClick);
            btnRegist.onClick.AddListener(BtnRegist_OnClick);
        }
        private void OnDestroy()
        {
            btnStart.onClick.RemoveListener(BtnStart_OnClick);
            btnRegist.onClick.RemoveListener(BtnRegist_OnClick);
        }
        #endregion

        #region private method
        private void BtnStart_OnClick()
        {
            Dispatch(AreaCode.UI, UIEvent.START_CANVAS_ACTIVE, true);
        }
        private void BtnRegist_OnClick()
        {
            Dispatch(AreaCode.UI, UIEvent.REGIST_CANVAS_ACTIVE, true);
        }
        #endregion
    }
}